﻿#include "FITKAbaConstraintTie.h"


namespace Interface {

FITKAbaAbstractConstraint::FITKAbaConstraintType FITKAbaConstraintTie::getConstraintType() const
{
    return FITKAbaAbstractConstraint::FITKAbaConstraintType::Tie;
}

bool FITKAbaConstraintTie::copy(FITKAbstractDataObject *obj)
{
    bool ok = FITKAbaAbstractConstraint::copy(obj);
    if (!ok)
        return false;
    FITKAbaConstraintTie* tie = dynamic_cast<FITKAbaConstraintTie*>(obj);
    if (tie == nullptr)
        return false;
    this->setDataObjectName(tie->getDataObjectName());
    m_discretizationMethod = tie->m_discretizationMethod;
    m_excludeShellThickness = tie->m_excludeShellThickness;
    m_postionTol = tie->m_postionTol;
    m_positionDistance = tie->m_positionDistance;
    m_adjustSlave = tie->m_adjustSlave;
    m_tieRotationDofs = tie->m_tieRotationDofs;
    m_constraintRatio = tie->m_constraintRatio;
    m_constraintRatioValue = tie->m_constraintRatioValue;
    return true;
}

FITKAbaConstraintTie::DiscretizationMethod FITKAbaConstraintTie::getDiscretizationMethod() const
{
    return m_discretizationMethod;
}

void FITKAbaConstraintTie::setDiscretizationMethod(DiscretizationMethod newDiscretizationMethod)
{
    m_discretizationMethod = newDiscretizationMethod;
}

bool FITKAbaConstraintTie::getExcludeShellThickness() const
{
    return m_excludeShellThickness;
}

void FITKAbaConstraintTie::setExcludeShellThickness(bool newExcludeShellThickness)
{
    m_excludeShellThickness = newExcludeShellThickness;
}

FITKAbaConstraintTie::PositionTolerance FITKAbaConstraintTie::getPostionTolerance() const
{
    return m_postionTol;
}

void FITKAbaConstraintTie::setPostionTol(PositionTolerance newPostionTol)
{
    m_postionTol = newPostionTol;
}

double FITKAbaConstraintTie::getPositionDistance() const
{
    return m_positionDistance;
}

void FITKAbaConstraintTie::setPositionDistance(double newPositionDistance)
{
    m_positionDistance = newPositionDistance;
}

bool FITKAbaConstraintTie::getAdjustSlave() const
{
    return m_adjustSlave;
}

void FITKAbaConstraintTie::setAdjustSlave(bool newAdjustSlave)
{
    m_adjustSlave = newAdjustSlave;
}

bool FITKAbaConstraintTie::getTieRotationDofs() const
{
    return m_tieRotationDofs;
}

void FITKAbaConstraintTie::setTieRotationDofs(bool newTieRotationDofs)
{
    m_tieRotationDofs = newTieRotationDofs;
}

FITKAbaConstraintTie::ConstraintRatio FITKAbaConstraintTie::getConstraintRatio() const
{
    return m_constraintRatio;
}

void FITKAbaConstraintTie::setConstraintRatio(ConstraintRatio newConstraintRatio)
{
    m_constraintRatio = newConstraintRatio;
}

double FITKAbaConstraintTie::getConstraintRatioValue() const
{
    return m_constraintRatioValue;
}

void FITKAbaConstraintTie::setConstraintRatioValue(double newConstraintRatioValue)
{
    m_constraintRatioValue = newConstraintRatioValue;
}

}
